package org.yocastlong.mybatisplus.common.exceptions;

import org.yocastlong.mybatisplus.common.enums.AbstractErrorEnum;

/**
 * @author 朱海龙
 * 2025/6/10 08:44
 */
public class BaseRunTimeException extends RuntimeException {

    protected String errorCode;
    protected String errorMsg;

    public BaseRunTimeException(AbstractErrorEnum abstractErrorEnum) {
        this.errorCode = abstractErrorEnum.getErrorCode();
        this.errorMsg  = abstractErrorEnum.getErrorMsg();
    }

    public BaseRunTimeException(AbstractErrorEnum abstractErrorEnum, String errorMsg) {
        this.errorCode = abstractErrorEnum.getErrorCode();
        this.errorMsg  = errorMsg;
    }

}
